--- /dev/null
+from openerp.osv import osv
+from openerp.osv import fields
+
+class Partner(osv.osv):
+ _inherit = 'res.partner'
+
+ def _default_country(self, cr, uid, context=None):
+ if not context:
+ context = {}
+ country_obj = self.pool.get('res.country')
+ country = country_obj.search(cr, uid, [('name', '=', 'France')], context=context)
+ return country
+
+ def _default_nationality(self, cr, uid, context=None):
+ if not context:
+ context = {}
+ nationality_obj = self.pool.get('res.country')
+ nationality = nationality_obj.search(cr, uid, [('name', '=', 'France')], context=context)
+ return nationality
+
+ _defaults = {
+ 'country_id': _default_country,
+ 'nationality_id': _default_nationality,
+ }
+
+Partner()
+